/**
 * Created with IntelliJ IDEA.
 * User:xieChao
 * Date:2022/10/6 21:24
 */
public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(0,1);
        myArrayList.add(1,2);
        myArrayList.add(2,2);
        myArrayList.add(3,4);
        myArrayList.add(4,5);
        System.out.println(myArrayList.useSize);
        myArrayList.display();
        System.out.println(myArrayList.contains(3));
        System.out.println(myArrayList.search(5));
        System.out.println(myArrayList.getPos(4));
       //myArrayList.setPos(2,99);
        //myArrayList.display();
        myArrayList.remove(2);
        myArrayList.display();
        System.out.println(myArrayList.useSize);

    }
}
